<?php
class User{
	protected $name;
	public static $class='三年一班';
	const EXISTS_VALIDATE=1;

	public function say(){
		return self::$class.$this->getName()."说：您好".self::EXISTS_VALIDATE;
	}
	public function setName(string $name){
		$this->name=$name;
	}
	public function getName(){
		return $this->name;
	}
	public static function getClassName(){
		return self::$class;
	}
}

$a=new User;
$a->setName('于志伟');
echo $a->say();
echo "<br>";
echo User::EXISTS_VALIDATE;
// User::$class="四年级";
// echo User::$class;
echo "<br>";
echo User::getClassName();
echo "<hr>";

$b=new User;
$b->setName("李四");
echo $b->say();

//三年一班于志伟说：您好1
//1
//三年一班
//三年一班李四说：您好1